package cn.yerly.sakura.repository;

import cn.yerly.sakura.domain.UserItemStar;
import org.springframework.data.jpa.repository.*;

import java.util.List;

/**
 * Spring Data JPA repository for the UserItemStar entity.
 */
public interface UserItemStarRepository extends JpaRepository<UserItemStar,Long> {

    @Query("select userItemStar from UserItemStar userItemStar where userItemStar.user.login = ?#{principal.username}")
    List<UserItemStar> findAllForCurrentUser();

}
